package com.nxj.controller;

import com.nxj.annotations.MyAutowired;
import com.nxj.annotations.MyController;
import com.nxj.annotations.MyRequestMapping;
import com.nxj.service.HelloService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@MyController
@MyRequestMapping("/demo")
public class HelloController {

    // 故意
    @MyAutowired(value = "hlloService")
    HelloService helloService;

    @MyRequestMapping("/hello.do")
    public String hello(HttpServletRequest request, HttpServletResponse response, String name) {
        return helloService.doHello(name);
    }

}
